package com.hou.educms.controller;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.hou.commonutils.R;
import com.hou.educms.entity.CrmBanner;
import com.hou.educms.service.CrmBannerService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import sun.rmi.runtime.Log;

import java.util.List;

/**
 * @author shkstart
 * @create 2021-11-14-11:44
 * 前台banner控制器
 */
@RestController
@RequestMapping("/educms/banner/front")
@CrossOrigin
public class BannerFrontController {

    @Autowired
    private CrmBannerService service;

    // 获取热门banner
    @GetMapping("getAllBanner")
    public R getAllBanner () {
        List<CrmBanner> list = service.getHotBanner();
        return R.ok().data("items",list);
    }

}
